package com.example.mybatisdemo1.Controller;

import com.example.mybatisdemo1.Service.UserService;
import com.example.mybatisdemo1.enity.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/getAll")
    public List<UserEntity> getAll() {
        return userService.getAll();
    }
}
